#pragma once

#include "types.h"

const int RAMSIZE = 0x10000;

class z80Mem
{
  private:
    std::vector<byte> buffer;
  
  public:
    z80Mem();
    ~z80Mem();

    void load(std::string fname);

    void peek(int size);

    inline byte read(word offset) { return buffer[offset]; }
	
    inline void write(word offset, byte data) { buffer[offset] = data; }
    
    inline byte inc(word offset) { return ++buffer[offset]; }
    
    inline byte dec(word offset) { return --buffer[offset]; }

    void clear();
};
